<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</meta>
<style type="text/css">
	*{
		margin: 0px;
		padding: 0px;
	}
	.maxBox{
		width: 1000px;
		margin:auto;
		height:auto;
		margin-top:0px;
		
	}
	.td_height{
	height:24px;
	}
	.data{
		text-align: right;
		width: 80px;
		}
		.data_td{
			width: 130px;
			text-align: left;
			}
	.table1 tr td{ text-align:center;border:1px solid #000;}
</style>
<body>
	<div class="maxBox">
	<center><h3 style="font-size:24px;">有棵树科技产品质检报告单</h3></center>
	<table summary="" style="float:right;margin-bottom:3px;" >
		<tr>
			<td class="data">日期：</td>
			<td class="data_td"><?php echo date('Y-m-d'); ?></td>
		</tr>
		<tr>
			<td class="data">凭证单号：</td>
			<td class="data_td"><?php if($code){ echo $code; }else{ echo $evidence;} ?></td>
		</tr>
	</table>
	<?php 
	$num = count($result);
	$j=0;
	for($i=0;$i<=$num/5;$i++){
	
	if((!isset($result[$j]['purchaseorder_id']))||$result[$j]['purchaseorder_id']==''){
		if($i==$num/5){?>
		<span style="float:left;margin-right:10px;margin-top:10px; margin-left:200px;">审核人:</span>
		<span style="float:right; margin-right:180px; margin-top:10px;">
		经办人:  <?php echo $user_name;?>  </span>
	<?php }continue;}?>
	
	<table class="table1" border="1" cellSpacing="1"  style="margin-top:5px;border-collapse:collapse;" cellpadding="0" cellspacing="0" width="1000px">
		<tr>
			<td class="td_height">序号</td>
			<td class="td_height" style="width:120px;">VMI预约单号</td>
			<td class="td_height" style="width:65px;">计划员</td>
			<td class="td_height">SKU</td>
			<td class="td_height">中文名称</td>
			<td class="td_height" style="width:80px;">到货数量</td>
			<td class="td_height" style="width:80px;">入库数量</td>
			<td class="td_height" style="width:100px;">不合格数量</td>
			<td class="td_height">问题原因</td>
			<td class="td_height">备注</td>
		</tr>
		<?php	for($z=0;$z<5;$z++){if((!isset($result[$j]['purchaseorder_id']))||$result[$j]['purchaseorder_id']=='')continue;?>
		<tr>
			<td class="td_height"><?php echo $j+1; ?></td>
			<td><?php echo $result[$j]['purchaseorder_id']; ?></td>
			<td><?php echo $result[$j]['check_man']; ?></td>
			<td><?php echo $result[$j]['sku']; ?></td>
			<td><?php echo $result[$j]['sku_name']; ?></td>
			<td><?php echo $result[$j]['check_quantity']; ?></td>
			<td><?php echo $result[$j]['qualified_quantity']; ?></td>
			<td><?php echo $result[$j]['unquality_count'];?></td>
			<td><?php echo $result[$j]['remark']; ?></td>
			<td><?php echo $puOrdRemarks[$result[$j]['purchaseorder_id']]; ?></td>
		</tr>
		<?php $j++;}?>
	</table>
	<?php if($i== (int)($num/5)){?>
	<span style="float:left;margin-right:10px;margin-top:10px; margin-left:200px;">审核人:</span>
	<span style="float:right; margin-right:180px; margin-top:10px;">
	经办人:  <?php echo $user_name;?>  </span><?php }?>
		<div style="page-break-after:always;"></div>
	<?php }?>
		</div>
</body>
</html>
